package com.wei800.turnover.config;

import com.wei800.common.util.SnowFlakeUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SnowFlakeUtilsConfig {
    @Value("${yinguo.snow-flake.datacenter-id}")
    private Integer datacenterId;
    @Value("${yinguo.snow-flake.machine-id}")
    private Integer machineId;
    @Bean
    public SnowFlakeUtils snowFlakeUtils() {
        return new SnowFlakeUtils(this.datacenterId, this.machineId);
    }
}
